
#include "gd32f10x_rcu.h"
#include "Bsp.h"

void PCF8563_Init(void);

void BSP_Init(void){
	__enable_irq();
    rcu_periph_clock_enable(RCU_AF);	
	gpio_pin_remap_config(GPIO_SWJ_SWDPENABLE_REMAP, ENABLE);
	BSP_Timer_Init();
	BSP_Relay_Init();
	BSP_Led_Init();
	BSP_Buzzer_Init();
	BSP_WG_Init();
//		W25Q_IO_Init();
	BSP_Signal_Init();
	BSP_Keyboard_Init();
	RFIO_Init();
	BSP_USB_Init();
	BSP_RS485_Init();
	BSP_Uart_Init(4);
	BSP_Uart_Init(0);
//		SD3078_Init();
	PCF8563_Init();
}

void BSP_ResetSystem(void){
	NVIC_SystemReset();
}

uint8_t Bsp_GetUid(uint32_t uid[3]){
	uid[0] = *(__IO uint32_t*)(0x1FFFF7E8);
	uid[1] = *(__IO uint32_t*)(0x1FFFF7EC);
	uid[2] = *(__IO uint32_t*)(0x1FFFF7F0);
	return 12;
}


